home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / TeX / makeTeX < prev    next >
Text File  |  1994-08-01  |  10KB  |  353 lines

  1. #! /bin/csh -f
  2.  
  3. #------------------------------------------------------------------------
  4. #
  5. #  TeX is a public domain text processing system.  It was developed by
  6. #  Donald Knuth at Stanford University, and is made freely available
  7. #  without license.  TeX is a large and complicated program that goes
  8. #  to extraordinary lengths to produce attractive typeset material.
  9. #  However, straightforward text is very easy to typeset using \TeX\null.
  10. #  So it's possible to start with easier text and work up to more
  11. #  complicated situations.  The document, GENTLE_INTRO.TEX, is included
  12. #  in the "texfiles.tar" file.  Instructions explaining how produce the
  13. #  manual are included below.
  14. #  
  15. #  The installation of TeX requires approximately 11 Mbytes of permanent
  16. #  space on your /usr disk (for the executables and other files), as well
  17. #  as approximately 56 Mbytes of scratch space.  The scratch space can
  18. #  be on any available disk.  The installation script can be run
  19. #  directly from the CD-ROM.
  20. #
  21. #  To run this installation script, you must first specify the path
  22. #  of a directory for the scratch space (eg., /usr/tmp).  A temporary
  23. #  directory will be created within that directory called "TeX_install".
  24. #  After the installation is completed successfully, you may remove
  25. #  "TeX_install".
  26. #
  27. #  Be sure that you have write access to the installation directory.
  28. #  If the directory you want to use for this purpose is remotely mounted,
  29. #  make sure you have write access to that disk by checking the /etc/exports
  30. #  file on the remote machine.  For instance, if you want to use the
  31. #  directory, /d/tmp, on a machine named wally, then the /etc/exports
  32. #  file on wally should include a line that looks something like this:
  33. #  "/d -rw ...".  If the "-rw" option is not included, add it, and
  34. #  then (as "root" on wally) execute the command, "exportfs -a".
  35. #
  36. #  To begin the installaion of TeX, specify the installation directory
  37. #  by typing:
  38. #
  39. #       setenv INSTALL_DIR /a/directory/path
  40. #
  41. #  Because of the large amount of information generated by the
  42. #  installation procedure, it's best to save the output into a file.
  43. #
  44. #  To execute the installation script, type:
  45. #
  46. #       su
  47. #       (time ./makeTeX) >& /usr/tmp/maketex.out &
  48. #
  49. #  Note that you must execute "makeTeX" from the directory where resides,
  50. #  and that "root" permission is required.  The installation takes
  51. #  approximately 35 minutes on a 4D/35.  The metafont generation takes
  52. #  most of this time.
  53. #
  54. #  To view the installation output:
  55. #
  56. #       cd /usr/tmp
  57. #       fold maketex.out > tmp
  58. #       mv tmp maketex.out
  59. #       more maketex.out
  60. #
  61. #  In "maketex.out", you will find some errors and lots warnings.
  62. #  Several installs get warnings from the loader about duplicate
  63. #  modules, but I didn't take the time to thoroughly investigate
  64. #  (ignore these).  Also, several of the man pages were attempting
  65. #  to move to BSD directories (not SYSV).
  66. #   
  67. #  If you don't find any glaring errors, move to the $INSTALL_DIR/TeX_install
  68. #  directory and extract the files from the "texfiles.tar" file with the
  69. #  command:
  70. #
  71. #       tar xvof texfiles.tar
  72. #
  73. #  This will create a "texfiles" directory containing the two files,
  74. #  gentle.ps and gentle.tex.
  75. #
  76. #  To test the software, log in as a regular user (not as "root") and
  77. #  set the following environment variables:
  78. #
  79. #       setenv TEXFONTS /usr/local/lib/tex/fonts/pk/laserwriter:/usr/local/lib/tex/fonts/tfm
  80. #       setenv TEXINPUTS .:/usr/local/lib/tex/inputs
  81. #       setenv TEXPKS /usr/local/lib/tex/fonts/pk/laserwriter
  82. #
  83. #  If you'll be using TeX frequently, add the above lines to your .cshrc
  84. #  file.
  85. #
  86. #  Now do the following:
  87. #
  88. #       tex gentle.tex
  89. #       dvips gentle.dvi
  90. #
  91. #  This should create a "gentle.ps" file, which is a PostScript document
  92. #  containing the TeX manual.  The manual is 95 pages long.
  93. #
  94. #  Finally, after you are satisfied that the installation was successful,
  95. #  save the "texfiles" directory, and after looking around at the additional
  96. #  directories for any useful programs, data, examples, etc., remove the
  97. #  $INSTALL_DIR/TeX_install directory.
  98. #
  99. #
  100. #      -------------------------------------------------------
  101. #
  102. #
  103. #  If your IRIS workstation has the EOE (Execution-Only-Environment) system
  104. #  software installed, you may still install TeX.  To do this, log in as
  105. #  "root" and extract the executables by typing the command:
  106. #
  107. #       tar xvof binaries.tar
  108. #
  109. #  This will give you all the binaries in /usr/local that are needed
  110. #  to run TeX.  These were created using IRIX 4.0.1, so they will not
  111. #  work if you are running an OS prior to IRIX 4.0.
  112. #
  113. #
  114. #
  115. #************************************************************************
  116. #
  117. #   Script modified by Marvin Kong for use in the Developer's Toolbox
  118. #   (MKK, 12/11/91)
  119. #
  120. #************************************************************************
  121. #
  122. #   The following script was created by Chuck Adams,
  123. #   adams@relay.dallas.sgi.com, using the source files
  124. #   from byron.u.washington.edu, and other sites.
  125. #
  126. #   And a special thanks to:
  127. #   Jan Labanowski
  128. #   Ohio Supercomputer Center
  129. #   jkl@osc.edu
  130. #   who made tex_for_sgi document available to everyone.
  131. #   The work that Jan did, certainly made it much easier
  132. #   for the rest of us.
  133. #
  134. #   No warranties, guarantees, etc. apply.
  135. #
  136. #   Any additional hacks greatly appreciated by adams@relay.dallas.sgi.com
  137. #   A ftp site will located to place everything in, but if you
  138. #   got this, then you probably don't need it at this time.
  139. #
  140. #   ENJOY.  MAY THE FORCE BE WITH YOU.
  141. #
  142. #---------------------------start of script----------------------
  143. #
  144. #
  145. #  Specify path to the TeX tar files.
  146. #
  147. set tarpath=`pwd`
  148. #
  149. #
  150. #  Open installation directory.
  151. #
  152. if ( ! -d $INSTALL_DIR ) then
  153.     echo ' '
  154.     echo 'ERROR:  The INSTALL_DIR directory:'
  155.     echo ' '
  156.     echo $INSTALL_DIR
  157.     echo ' '
  158.     echo 'does not exist.'
  159.     echo ' '
  160.     echo 'To specify INSTALL_DIR, type:'
  161.     echo ' '
  162.     echo '      setenv INSTALL_DIR /a/directory/path'
  163.     echo ' '
  164.     echo 'and then rerun this script.'
  165.     echo ' '
  166.     exit
  167. endif
  168. #
  169. if ( -d $INSTALL_DIR/TeX_install ) then
  170.     /bin/rm -rf $INSTALL_DIR/TeX_install
  171. endif
  172. mkdir $INSTALL_DIR/TeX_install
  173. chmod 777 $INSTALL_DIR/TeX_install
  174. #
  175. set instpath=$INSTALL_DIR/TeX_install
  176. #
  177. #
  178. #  Create link to communicate with other Makefiles.
  179. #
  180. ln -s $instpath /usr/TeX_distribution
  181. #
  182. #
  183. #   The unaliases are just in case you have -i turned on.
  184. #
  185. unalias ls
  186. unalias rm
  187. unalias cp
  188. #
  189. #   Set /usr/local/bin into path for later makefiles.
  190. #
  191. set path = ( $path /usr/local/bin )
  192. #
  193. #
  194. \rm -rf /usr/local/lib/tex
  195. \rm -rf /usr/local/lib/mf
  196. #
  197. mkdir -p /usr/local/lib/tex
  198. mkdir -p /usr/local/lib/tex/formats
  199. mkdir -p /usr/local/lib/tex/fonts
  200. mkdir -p /usr/local/lib/tex/fonts/pk
  201. mkdir -p /usr/local/lib/tex/fonts/pk/laserwriter
  202. mkdir -p /usr/local/lib/tex/fonts/tfm
  203. mkdir -p /usr/local/lib/tex/inputs
  204. mkdir -p /usr/local/lib/tex/bib
  205. mkdir -p /usr/local/lib/tex/bibtex
  206. mkdir -p /usr/local/lib/mf
  207. mkdir -p /usr/local/lib/mf/inputs
  208. mkdir -p /usr/local/lib/mf/bases
  209. #
  210. if ( ! -d /usr/local/bin ) then
  211.     mkdir -p /usr/local/bin
  212. endif
  213. #
  214. #
  215. cd $instpath
  216. #
  217. #
  218. tar xof $tarpath/Unsupported.tar
  219. tar xof $tarpath/ams.tar
  220. tar xof $tarpath/babel.tar
  221. tar xof $tarpath/bsdtar.tar
  222. tar xof $tarpath/cmfonts.tar
  223. tar xof $tarpath/compress.tar
  224. tar xof $tarpath/dvips547.tar
  225. tar xof $tarpath/dvipsafm.tar
  226. tar xof $tarpath/dvipslib.tar
  227. tar xof $tarpath/dviware.tar
  228. tar xof $tarpath/latexfonts.tar
  229. tar xof $tarpath/patch.tar
  230. tar xof $tarpath/tex314.tar
  231. tar xof $tarpath/utilityfonts.tar
  232. #
  233. #  Now make files from tex_for_sgi.
  234. #
  235. sed -n '132,136p' $tarpath/tex_for_sgi >$instpath/TeX3.14/emplant
  236. chmod 755 $instpath/TeX3.14/emplant
  237. #
  238. sed -n '141,437p' $tarpath/tex_for_sgi >$instpath/TeX3.14/Makefile
  239. #
  240. sed -n '444,627p' $tarpath/tex_for_sgi >$instpath/TeX3.14/site.h
  241. #
  242. sed -n '633,643p' $tarpath/tex_for_sgi >$instpath/TeX3.14/mypaths
  243. #
  244. #
  245. sed -n '813,880p' $tarpath/tex_for_sgi >$instpath/DVIware/crt-viewers/X/xdvi/Makefile
  246. #
  247. sed -n '897,1113p' $tarpath/tex_for_sgi >$instpath/dvips/Makefile
  248. #
  249. sed -n '1120,1153p' $tarpath/tex_for_sgi >$instpath//dvips/config.ps
  250. #
  251. sed -n '1160,1280p' $tarpath/tex_for_sgi >$instpath/dvips/MakeTeXPK
  252. #
  253. cp $tarpath/Makefile.bibtex $instpath/TeX3.14/bibtex/Makefile
  254. cp $tarpath/Makefile.TeX3.14 $instpath/TeX3.14/Makefile
  255. cp $tarpath/makepkfiles $instpath/dvips/makepkfiles
  256. #
  257. cd $instpath/TeX3.14
  258. #
  259. #  Get rid of extraneous files in directory.
  260. #
  261. \rm -f Makefile-dist
  262. \rm -f site.h-dist
  263. \rm -f makefile
  264. #
  265. chmod 755 mypaths
  266. source mypaths
  267. chmod 755 $dl
  268. chgrp sys $dl
  269. chown bin $dl
  270. cp $wl/TeXfonts/* $fl
  271. #
  272. sed -n '655,714p' $tarpath/tex_for_sgi > $instpath/TeX3.14/Install_INPUTS
  273. #
  274. sh -x Install_INPUTS
  275. cp $tarpath/modes.mf /usr/local/lib/mf/modes.mf
  276. #
  277. #  Now execute makefiles.
  278. #
  279. cd $instpath/TeX3.14
  280. make
  281. make install
  282. make formats
  283. make install-formats
  284. make bases
  285. make install-bases
  286. make manpages
  287. make install-manpages
  288. #
  289. #  Now make xdvi.
  290. #
  291. echo begin xdvi make and install
  292. #
  293. cd $instpath/DVIware/crt-viewers/X/xdvi
  294. make xdvi
  295. make install
  296. #
  297. #  Now make dvips.
  298. #
  299. cd $instpath/dvips
  300. make all
  301. chmod 755 dvips
  302. cp dvips /usr/local/bin
  303. cp ma
  304. #
  305. #  Now make cminch.
  306. #
  307. ./MakeTeXPK cminch 300 300 magstep\(0\)
  308. #
  309. ./makepkfiles
  310. #
  311. #  Go back and fix problems.
  312. #
  313. cd $instpath/TeX3.14/bibtex
  314. make
  315. mv bibtex /usr/local/bin
  316. #
  317. #  Clean up some permissions and copy executables to /usr/local/bin.
  318. #
  319. cp $instpath/dvips/dvips /usr/local/bin
  320. cp $instpath/dvips/MakeTeXPK /usr/local/bin
  321. chmod 755 /usr/local/bin/dvips
  322. chmod 755 /usr/local/bin/MakeTeXPK
  323. cp $instpath/dvips/{*.tex,*.pro} /usr/local/lib/tex/inputs
  324. #
  325. chmod 755 /usr/local/lib
  326. chmod 755 /usr/local/lib/tex
  327. chmod 755 /usr/local/lib/tex/inputs
  328. chmod 755 /usr/local/lib/tex/fonts
  329. chmod 755 /usr/local/lib/tex/fonts/pk
  330. chmod 777 /usr/local/lib/tex/fonts/pk/laserwriter
  331. chmod 755 /usr/local/bin/bibtex
  332. chmod 755 /usr/local/lib/mf
  333. chmod 755 /usr/local/lib/mf/bases
  334. chmod 655 /usr/local/lib/mf/bases/*
  335. chmod 755 /usr/local/lib/tex/bibtex
  336. chmod 644 /usr/local/lib/tex/inputs/*
  337. #
  338. mkdir /usr/local/lib/tex/ps
  339. chmod 755 /usr/local/lib/tex/ps
  340. cp $instpath/dvips/*.pro /usr/local/lib/tex/ps
  341. chmod 644 /usr/local/lib/tex/ps/*
  342. #
  343. #  Remove link.
  344. #
  345. /bin/rm /usr/TeX_distribution
  346. #
  347. #  Copy texfile.tar to installation directory.
  348. #
  349. cp $tarpath/texfiles.tar $instpath
  350. #
  351. exit
  352.  
  353.